package com.xw.comm.controller;

import com.xw.comm.entity.ActionTypeEnum;
import com.xw.comm.entity.BaseResponse;
import com.xw.comm.entity.CobraResultCodeConstant;
import com.xw.comm.entity.ResultCode;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xiongwei_vendor
 * @date 2021/4/25 17:03
 */
public class ImageActionController {

    @GetMapping(value = "/receiveData")
    @ApiOperation(value = "接收数据", notes = "字符串")
    @ApiImplicitParam(paramType = "query", name = "message", value = "数据", required = false, dataType = "String")
    public BaseResponse sendCharacter(@RequestParam(value = "message", required = true, defaultValue = "") String message,
                                      @RequestParam(value = "type", required = true, defaultValue = "") String type) {
        ResultCode resultCode = CobraResultCodeConstant.SUCCESS;
        ActionTypeEnum actionTypeEnum = ActionTypeEnum.build(type);

        return new BaseResponse(resultCode);
    }

}
